There are various methods proposed for non-contact depth measurement from three-dimensional scenes, that is, the distance to each of objects in the scene. One example is the depth from defocus (DFD) method (hereinafter also simply referred to as DFD). DFD measures the distance based on information on lens blur, the size and shape of which change depending on the object distance. The features of DFD include no need to use plural cameras and the capability of distance measurement from a small number of images. The processing of measuring the distance to an object using the DFD method is also called DFD processing.
Hereinafter, the principle of DFD will be briefly described.
DFD is a method of measuring an object distance from plural images having different focus positions, based on lens blur information. A captured image containing lens blur is an image obtained by convolving an all-in-focus image showing no lens blur caused by the lens (object texture information) with a point spread function that is a function of the object distance. Since the point spread function is a function having the object distance as the variable, DFD can determine the object distance by detecting lens blur from blurred images.
Here, the all-in-focus image and the object distance are unknown. For one blurred image, one equation is established regarding the blurred image, the all-in-focus image, and the object distance. A new equation is obtained by newly capturing, from the same visual point, a blurred image having a different focus position. By solving plural equations obtained, the object distance is determined. Regarding the method for obtaining the equations and the method for solving the equations, there are various proposals for DFD, including Non Patent Literature (NPTL) 1.
Furthermore, phase difference detection method is another method for measuring the distance to an object (see Patent Literature (PTL) 1, for example). With the phase difference detection method, images are captured which have a phase difference between a first pixel group and a second pixel group that are included in the imaging device (images captured from different visual points). Then, based on the phase difference of an object (positional misalignment) between the two images, the distance to this object is detected.